# 导包
import time
import unittest
from dgsgs import MyTestCase
from unittest444.HTMLTestRunner import HTMLTestRunner
from unittest444.test666 import MyTestCase1
suite = unittest.TestSuite()
suite.addTest(MyTestCase1("test_success"))
suite.addTest(unittest.makeSuite(MyTestCase))
# 指定报告路径
report = "./report-{}.html".format(time.strftime("%Y%m%d-%H%M%S"))
# 打开文件流
with open(report, "wb") as f:
    # 创建HTMLTestRunner执行器
    runner = HTMLTestRunner(f, title="接口测试报告")
    # 执行测试套件
    runner.run(suite)